package com.scott;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

/**
 * @author 黄后林
 * @version 1.0
 * @note
 * @date 2022-03-13 17:53:19
 */
public class T02 {

    public static void main(String[] args) throws  Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int len = Integer.parseInt(br.readLine());
        String[] ss = br.readLine().trim().split(" ");
        int [] arr = new int[len];
        for(int index =0; index<len;index++){
                arr[index] =Integer.parseInt(ss[index]);
        }

        if(ss.length ==0){
            return;
        }

        int rs=0;
        for(int index=0;index<arr.length;index++){
            rs ^=arr[index];
        }
        System.out.println(rs);

    }
}
